<?php
/**
 * 后台首页
 * Created by PhpStorm.
 * User: yhz
 * Date: 2017-12-19
 * Time: 17:09
 */
namespace app\admin\controller;

use tools\Sysinfo;

class Index extends BaseController
{
    public function index()
    {
        $sysinfo = new Sysinfo();
        $sys_info = [
            'tladmin_version' => $sysinfo->getTladminVersion(),
            'Thinkphp_version' => $sysinfo->getThinkVersion(),
            'server_os' => $sysinfo->getServerOs(),
            'web_server' => $sysinfo->getServerSoftware(),
            'mysql_version' => $sysinfo->getMysqlVersion(),
            'php_version' => $sysinfo->getPHPVersion(),
        ];
        $tladmin_info = [
            'name' => config('tladmin.name'),
            'member' => config('tladmin.member'),
            'contactQQ' => config('tladmin.contactQQ'),
            'git_add' => config('tladmin.git_add'),
            'tanks' => config('tladmin.tanks'),
            'email' => config('tladmin.email'),

        ];
        $this->assign([
            'sys' => $sys_info,
            'tladmin'=>$tladmin_info

        ]);
        return $this->fetch();
    }

    public function test()
    {
        return $this->fetch();
    }

}